package jsyf.oa.entity.wreport;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by Administrator on 2017/11/22 0022.
 */
@Entity
@Table(name = "T_WRT_MAIN", schema = "oa", catalog = "")
public class WReportMainEntity  implements Serializable {
    private String id;
    private String title;
    private String userId;
    private Date createTime;
    private String reportDate;
    private String moduleENames;
    private String flage;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "TITLE")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "USER_ID")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "REPORT_DATE")
    public String getReportDate() {
        return reportDate;
    }

    public void setReportDate(String reportDate) {
        this.reportDate = reportDate;
    }

    public String getModuleENames() {
        return moduleENames;
    }

    public void setModuleENames(String moduleENames) {
        this.moduleENames = moduleENames;
    }

    public String getFlage() {
        return flage;
    }

    public void setFlage(String flage) {
        this.flage = flage;
    }

    public JSONObject getJSONObject(){
        JSONObject obj = new JSONObject();
        obj.put("id", this.getId());
        obj.put("title", this.getTitle());
        obj.put("create_time", this.getCreateTime());
        obj.put("user_id", this.getUserId());
        obj.put("report_date", this.getReportDate());
        obj.put("module_e_names",this.getModuleENames());
        obj.put("flage",this.getFlage());
        return obj;
    }

    public JSONObject getJSONObjectId(){
        JSONObject obj = new JSONObject();
        obj.put("id", this.getId());

        return obj;
    }
}
